class company { public types: string; public m_profit: number; public cmp_count: number; constructor(Types: string, M_profit: number, comp_count: number) { this.types = Types; this.m_profit = M_profit; this.cmp_count = comp_count; } display() { console.log("Company Type:"+ this.types+" "+"Company Monthly profit:"+ this.m_profit+" "+"Company total count:"+ this.cmp_count); } } class software extends company { constructor(Types: string, M_profit: number, comp_count: number) { super(Types, M_profit, comp_count); } } class bank extends company{ constructor(Types: string, M_profit: number, comp_count: number) { super(Types, M_profit, comp_count); } } class medical extends company{ constructor(Types: string, M_profit: number, comp_count: number) { super(Types, M_profit, comp_count); } } var obj = new software("Software company", 500000, 10); var obj1 = new bank("Banking sector", 300000, 15); var obj2 = new medical("Medical field", 700000, 20); console.log("Company catetegory and details"); obj.display(); obj1.display(); obj2.display();